﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;

namespace WMI.NET.CIM
{
    /// <summary>
    /// The CIM_AssociatedProcessorMemory class associates the processor and system memory, or a processor's cache. 
    /// </summary>
    public class CIM_AssociatedProcessorMemory : CIM_AssociatedMemory
    {

        private CIM_Memory _Antecedent;
        private Nullable<UInt32> _BusSpeed;
        private CIM_Processor _Dependent;

        /// <summary>
        /// Reference to the memory installed on or associated with a device.
        /// </summary>
        public new CIM_Memory Antecedent { get { return _Antecedent; } }

        /// <summary>
        /// Speed of the bus, in megahertz (MHz), between the processor and memory.
        /// </summary>
        public Nullable<UInt32> BusSpeed { get { return _BusSpeed; } }

        /// <summary>
        /// Reference to the processor that accesses the memory or uses the cache.
        /// </summary>
        public new CIM_Processor Dependent { get { return _Dependent; } }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="mbo"></param>
        public CIM_AssociatedProcessorMemory(ManagementBaseObject mbo)
            : base(mbo)
        {
            _Antecedent = new CIM_Memory(mbo);
            _BusSpeed = mbo.GetUIntValue("BusSpeed");
            _Dependent = new CIM_Processor(mbo);
        }


    }
}
